
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>第4章 TMOS说明 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-intopic-toc/style.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../05_广播/05_广播.html" />
    
    
    <link rel="prev" href="../03_BLE的一些概念/03_BLE的一些概念.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../01_低功耗蓝牙简介/01_低功耗蓝牙简介.html">
            
                <a href="../01_低功耗蓝牙简介/01_低功耗蓝牙简介.html">
            
                    
                    第1章 低功耗蓝牙简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../02_低功耗蓝牙协议栈分析/02_低功耗蓝牙协议栈分析.html">
            
                <a href="../02_低功耗蓝牙协议栈分析/02_低功耗蓝牙协议栈分析.html">
            
                    
                    第2章 低功耗蓝牙协议栈分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../03_BLE的一些概念/03_BLE的一些概念.html">
            
                <a href="../03_BLE的一些概念/03_BLE的一些概念.html">
            
                    
                    第3章 BLE的一些概念
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.5" data-path="04_TMOS说明.html">
            
                <a href="04_TMOS说明.html">
            
                    
                    第4章 TMOS说明
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../05_广播/05_广播.html">
            
                <a href="../05_广播/05_广播.html">
            
                    
                    第5章 广播
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../06_广播常用设置/06_广播常用设置.html">
            
                <a href="../06_广播常用设置/06_广播常用设置.html">
            
                    
                    第6章 广播常用设置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../07_扫描/07_扫描.html">
            
                <a href="../07_扫描/07_扫描.html">
            
                    
                    第7章 扫描
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >第4章 TMOS说明</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="1&#x3001;tmos&#x7B80;&#x4ECB;">1&#x3001;TMOS&#x7B80;&#x4ECB;</h2>
<p><strong>TMOS</strong>&#x662F;&#x6C81;&#x6052;&#x5FAE;&#x7535;&#x5B50;&#x9488;&#x5BF9;&#x84DD;&#x7259;&#x534F;&#x8BAE;&#x6808;&#x5F00;&#x53D1;&#x7684;&#x201C;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x201D;&#xFF0C;&#x662F;&#x7B80;&#x5316;&#x7248;&#x7684;<strong>OSAL</strong>(Operating System Abstraction Layer)&#xFF0C;&#x5373;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x62BD;&#x8C61;&#x5C42;&#xFF0C;&#x4E00;&#x79CD;&#x4EE5;&#x5B9E;&#x73B0;&#x591A;&#x4EFB;&#x52A1;&#x4E3A;&#x6838;&#x5FC3;&#x7684;&#x7CFB;&#x7EDF;&#x8D44;&#x6E90;&#x7BA1;&#x7406;&#x673A;&#x5236;&#x3002;&#x7B80;&#x5355;&#x800C;&#x8A00;&#xFF0C;<strong>TMOS</strong>&#x5B9E;&#x73B0;&#x4E86;&#x7C7B;&#x4F3C;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x7684;&#x67D0;&#x4E9B;&#x529F;&#x80FD;&#xFF0C;&#x4F46;&#x5E76;&#x4E0D;&#x80FD;&#x79F0;&#x4E4B;&#x4E3A;&#x771F;&#x6B63;&#x610F;&#x4E49;&#x4E0A;&#x7684;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x3002;</p>
<h2 id="2&#x3001;tmos&#x5DE5;&#x4F5C;&#x673A;&#x5236;&#x5206;&#x6790;">2&#x3001;TMOS&#x5DE5;&#x4F5C;&#x673A;&#x5236;&#x5206;&#x6790;</h2>
<p>TMOS&#x662F;&#x901A;&#x8FC7;&#x65F6;&#x95F4;&#x7247;&#x8F6E;&#x8BE2;&#x7684;&#x65B9;&#x5F0F;&#x5B9E;&#x73B0;&#x591A;&#x4EFB;&#x52A1;&#x8C03;&#x5EA6;&#x8FD0;&#x884C;&#xFF0C;&#x5B9E;&#x9645;&#x4E0A;&#x6BCF;&#x6B21;&#x53EA;&#x6709;&#x4E00;&#x4E2A;&#x4EFB;&#x52A1;&#x8FD0;&#x884C;&#x3002;&#x7CFB;&#x7EDF;&#x65F6;&#x949F;&#x6765;&#x6E90;&#x4E8E;&#x82AF;&#x7247;<strong>RTC</strong>&#xFF0C;&#x5355;&#x4F4D;&#x4E3A;<strong>625us</strong>&#x3002;</p>
<p>&#x7528;&#x6237;&#x901A;&#x8FC7;&#x6CE8;&#x518C;<strong>&#x4EFB;&#x52A1;&#xFF08;Task&#xFF09;</strong>&#x5C06;&#x81EA;&#x5B9A;&#x4E49;&#x7684;<strong>&#x4E8B;&#x4EF6;&#xFF08;Event&#xFF09;</strong>&#x6DFB;&#x52A0;&#x5230;TMOS&#x7684;&#x4EFB;&#x52A1;&#x94FE;&#x8868;&#x4E2D;&#xFF0C;&#x7531;TMOS&#x8FDB;&#x884C;&#x8C03;&#x5EA6;&#x8FD0;&#x884C;&#x3002;</p>
<p>&#x6BCF;&#x4E2A;Task&#x6CE8;&#x518C;&#x540E;&#x5206;&#x914D;&#x4E00;&#x4E2A;ID&#xFF1B;&#x6BCF;&#x4E2A;Task&#x6700;&#x591A;&#x5305;&#x542B;16&#x4E2A;Event&#xFF0C;&#x5176;&#x4E2D;&#x5305;&#x62EC;1&#x4E2A;&#x6D88;&#x606F;&#x4E8B;&#x4EF6;(0x8000)&#x548C;15&#x4E2A;&#x81EA;&#x5B9A;&#x4E49;&#x4E8B;&#x4EF6;&#xFF0C;&#x91C7;&#x7528;<strong>BitMap</strong>&#x7684;&#x65B9;&#x5F0F;&#x5B9A;&#x4E49;&#x4E8B;&#x4EF6;&#x6807;&#x5FD7;&#xFF0C;&#x5982;:(0x0001&#x3001;0x0002&#x3001;0x0004&#x2026;&#x2026;0x8000)&#x3002;</p>
<p>Event&#x4E8B;&#x4EF6;&#x6807;&#x5FD7;&#x4F4D;&#xFF0C;&#x4E3A;1&#x5219;&#x8FD0;&#x884C;&#xFF0C;&#x4E3A;0&#x5219;&#x4E0D;&#x8FD0;&#x884C;&#x3002;</p>
<table>
<thead>
<tr>
<th>bit0</th>
<th>bit1</th>
<th>bit2</th>
<th>bit3</th>
<th>bit4</th>
<th>bit5</th>
<th>bit6</th>
<th>bit7</th>
<th>bit8</th>
<th>bit9</th>
<th>bit10</th>
<th>bit11</th>
<th>bit12</th>
<th>bit13</th>
<th>bit14</th>
<th>bit15</th>
</tr>
</thead>
<tbody>
<tr>
<td>0/1</td>
<td>0/1</td>
<td>0/1</td>
<td>0/1</td>
<td>0/1</td>
<td>0/1</td>
<td>0/1</td>
<td>0/1</td>
<td>0/1</td>
<td>0/1</td>
<td>0/1</td>
<td>0/1</td>
<td>0/1</td>
<td>0/1</td>
<td>0/1</td>
<td>0/1</td>
</tr>
</tbody>
</table>
<p><strong>TMOS&#x4EFB;&#x52A1;&#x94FE;&#x8868;&#x5982;&#x4E0B;&#xFF1A;</strong></p>
<p><img src="image/TMOS&#x4EFB;&#x52A1;&#x94FE;&#x8868;.png" alt="TMOS&#x4EFB;&#x52A1;&#x94FE;&#x8868;"></p>
<p>TMOS&#x5FAA;&#x73AF;&#x67E5;&#x8BE2;&#x4EFB;&#x52A1;&#x94FE;&#x8868;&#xFF0C;&#x6839;&#x636E;&#x4EFB;&#x52A1;ID&#x786E;&#x5B9A;&#x4F18;&#x5148;&#x7EA7;&#xFF0C;&#x8D8A;&#x5C0F;&#x8D8A;&#x9AD8;&#x3002;&#x6BCF;&#x4E2A;&#x4EFB;&#x52A1;&#x8FD0;&#x884C;&#x5B8C;&#x4E00;&#x4E2A;&#x4E8B;&#x4EF6;&#x540E;&#x4FBF;&#x901A;&#x8FC7;<strong>&#x5F02;&#x6216;</strong>&#x7684;&#x65B9;&#x5F0F;&#x6E05;&#x9664;&#x5DF2;&#x8FD0;&#x884C;&#x7684;&#x4E8B;&#x4EF6;&#xFF0C;&#x540C;&#x65F6;return&#x672A;&#x8FD0;&#x884C;&#x7684;&#x4E8B;&#x4EF6;&#x6807;&#x5FD7;&#xFF0C;&#x63A5;&#x7740;&#x8FD0;&#x884C;&#x4E0B;&#x4E00;&#x4E2A;&#x4EFB;&#x52A1;&#xFF1B;&#x5F53;&#x4EFB;&#x52A1;&#x8C03;&#x5EA6;&#x7CFB;&#x7EDF;&#x8FD0;&#x884C;&#x4E00;&#x904D;&#x540E;&#xFF0C;&#x518D;&#x6B21;&#x56DE;&#x6765;&#x8FD0;&#x884C;&#x4EFB;&#x52A1;&#x94FE;&#x8868;&#x5934;&#x7684;&#x4E00;&#x4E2A;&#x4E8B;&#x4EF6;&#xFF0C;&#x5982;&#x6B64;&#x5FAA;&#x73AF;&#x4E0B;&#x53BB;&#x3002;</p>
<p><strong>TMOS&#x8C03;&#x5EA6;&#x673A;&#x5236;&#x5982;&#x4E0B;&#xFF1A;</strong></p>
<p><img src="image/TMOS&#x8C03;&#x5EA6;&#x673A;&#x5236;.png" alt="TMOS&#x8C03;&#x5EA6;&#x673A;&#x5236;"></p>
<h2 id="3&#x3001;&#x5E38;&#x7528;api&#x5206;&#x6790;">3&#x3001;&#x5E38;&#x7528;API&#x5206;&#x6790;</h2>
<pre><code class="lang-c"><span class="hljs-comment">//&#x6CE8;&#x518C;&#x4EFB;&#x52A1;&#xFF0C;&#x4F20;&#x5165;&#x4EFB;&#x52A1;&#x4E8B;&#x4EF6;&#x56DE;&#x8C03;&#x51FD;&#x6570;&#xFF0C;&#x8FD4;&#x56DE;&#x4EFB;&#x52A1;ID&#x3002;</span>
<span class="hljs-function">tmosTaskID <span class="hljs-title">TMOS_ProcessEventRegister</span><span class="hljs-params">( pTaskEventHandlerFn eventCb )</span></span>;

<span class="hljs-comment">//&#x7ACB;&#x5373;&#x542F;&#x52A8;taskID&#x4EFB;&#x52A1;&#x4E2D;&#x5BF9;&#x5E94;&#x7684;event&#x4E8B;&#x4EF6;&#xFF0C;&#x4E8B;&#x4EF6;&#x53EA;&#x6267;&#x884C;&#x4E00;&#x6B21;</span>
<span class="hljs-function">bStatus_t <span class="hljs-title">tmos_set_event</span><span class="hljs-params">( tmosTaskID taskID, tmosEvents event )</span></span>;

<span class="hljs-comment">//&#x5B9A;&#x65F6;time*625us&#x540E;&#x542F;&#x52A8;taskID&#x4EFB;&#x52A1;&#x4E2D;&#x5BF9;&#x5E94;&#x7684;event&#x4E8B;&#x4EF6;&#xFF0C;&#x4E8B;&#x4EF6;&#x53EA;&#x6267;&#x884C;&#x4E00;&#x6B21;</span>
<span class="hljs-function">bStatus_t <span class="hljs-title">tmos_start_task</span><span class="hljs-params">( tmosTaskID taskID, tmosEvents event, tmosTimer time )</span></span>;

<span class="hljs-comment">//&#x505C;&#x6B62;&#x4E00;&#x4E2A;&#x5B9A;&#x65F6;&#x4E8B;&#x4EF6;</span>
<span class="hljs-function">bStatus_t <span class="hljs-title">tmos_stop_task</span><span class="hljs-params">( tmosTaskID taskID, tmosEvents event )</span></span>;

<span class="hljs-comment">//&#x6E05;&#x7406;&#x4E00;&#x4E2A;&#x5DF2;&#x7ECF;&#x8D85;&#x65F6;&#x7684;event&#x4E8B;&#x4EF6;&#xFF0C;&#x4E0D;&#x80FD;&#x5728;&#x81EA;&#x5DF1;&#x7684;event&#x51FD;&#x6570;&#x5185;&#x6267;&#x884C;</span>
<span class="hljs-function">bStatus_t <span class="hljs-title">tmos_clear_event</span><span class="hljs-params">( tmosTaskID taskID, tmosEvents event )</span></span>;

<span class="hljs-comment">//&#x5F00;&#x59CB;&#x4E00;&#x4E2A;&#x5B9A;&#x65F6;&#x4E8B;&#x4EF6;,&#x4E0D;&#x65AD;&#x7684;&#x6267;&#x884C;,&#x9664;&#x975E;&#x8FD0;&#x884C;tmos_stop_task&#x5173;&#x6389;,</span>
<span class="hljs-function">bStatus_t <span class="hljs-title">tmos_start_reload_task</span><span class="hljs-params">( tmosTaskID taskID, tmosEvents event, tmosTimer time )</span></span>;

<span class="hljs-comment">//&#x83B7;&#x53D6;&#x5BF9;&#x5E94;taskID &#x548C;event &#x7684;&#x6700;&#x540E;&#x4E00;&#x4E2A;&#x5468;&#x671F;&#x65F6;&#x957F;,&#x8FD4;&#x56DE;0&#x662F;&#x6CA1;&#x6709;&#x627E;&#x5230;</span>
<span class="hljs-function">tmosTimer <span class="hljs-title">tmos_get_task_timer</span><span class="hljs-params">( tmosTaskID taskID, tmosEvents event )</span></span>;

<span class="hljs-comment">//TMOS&#x65F6;&#x949F;&#x521D;&#x59CB;&#x5316;</span>
<span class="hljs-function">bStatus_t <span class="hljs-title">TMOS_TimerInit</span><span class="hljs-params">( pfnGetSysClock fnGetClock )</span></span>;

<span class="hljs-comment">//&#x8FD4;&#x56DE;tmos&#x7CFB;&#x7EDF;&#x8FD0;&#x884C;&#x65F6;&#x957F;,&#x5355;&#x4F4D;&#x4E3A;625us&#xFF0C;&#x5982;1600=1s</span>
<span class="hljs-keyword">uint32_t</span> TMOS_GetSystemClock( <span class="hljs-keyword">void</span> );

<span class="hljs-comment">//tmos&#x7684;&#x7CFB;&#x7EDF;&#x5904;&#x7406;&#x51FD;&#x6570;,&#x9700;&#x8981;&#x4E0D;&#x65AD;&#x5728;&#x4E3B;&#x51FD;&#x6570;&#x4E2D;&#x8FD0;&#x884C;</span>
<span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">TMOS_SystemProcess</span><span class="hljs-params">( <span class="hljs-keyword">void</span> )</span></span>;

<span class="hljs-comment">/**************&#x6D88;&#x606F;&#x76F8;&#x5173;*************/</span>
<span class="hljs-comment">//&#x53D1;&#x9001;&#x6D88;&#x606F;&#x51FD;&#x6570;&#xFF0C;&#x53C2;&#x6570;&#x4E3A;&#x6D88;&#x606F;&#x60F3;&#x8981;&#x53D1;&#x9001;&#x5230;&#x54EA;&#x4E00;&#x5C42;&#x7684;taskID&#x4EE5;&#x53CA;&#x6D88;&#x606F;&#x6307;&#x9488;&#x3002;&#x5F53;&#x8C03;&#x7528;&#x6B64;&#x51FD;&#x6570;&#x65F6;&#xFF0C;&#x5BF9;&#x5E94;&#x53C2;&#x6570;taskID&#x5C42;&#x7684;&#x6D88;&#x606F;&#x4E8B;&#x4EF6;&#x5C06;&#x4F1A;&#x7ACB;&#x5373;&#x7F6E;1&#x751F;&#x6548;</span>
<span class="hljs-function">bStatus_t <span class="hljs-title">tmos_msg_send</span><span class="hljs-params">( tmosTaskID taskID, uint8_t *msg_ptr )</span></span>;

<span class="hljs-comment">// &#x63A5;&#x6536;&#x6D88;&#x606F;&#x51FD;&#x6570;&#xFF0C;&#x53C2;&#x6570;&#x4E3A;&#x9700;&#x8981;&#x63A5;&#x6536;&#x4EFB;&#x52A1;taskID&#x7684;&#x6D88;&#x606F;&#x3002;</span>
<span class="hljs-keyword">uint8_t</span>   *tmos_msg_receive( tmosTaskID taskID );

<span class="hljs-comment">//&#x7533;&#x8BF7;&#x5185;&#x5B58;&#x51FD;&#x6570;&#xFF0C;&#x53D1;&#x9001;&#x6D88;&#x606F;&#x4E4B;&#x524D;&#x9700;&#x8981;&#x5148;&#x7ED9;&#x6D88;&#x606F;&#x7533;&#x8BF7;&#x5185;&#x5B58;&#x7A7A;&#x95F4;&#x3002;&#x5982;&#x679C;&#x8FD4;&#x56DE;&#x4E3A;NULL&#xFF0C;&#x5219;&#x7533;&#x8BF7;&#x5931;&#x8D25;</span>
<span class="hljs-keyword">uint8_t</span>   *tmos_msg_allocate( <span class="hljs-keyword">uint16_t</span> len );
<span class="hljs-comment">//&#x91CA;&#x653E;&#x6D88;&#x606F;&#x5360;&#x7528;&#x5185;&#x5B58;&#x7684;&#x51FD;&#x6570;&#xFF0C;&#x5904;&#x7406;&#x5B8C;&#x6D88;&#x606F;&#x540E;&#x9700;&#x8981;&#x91CA;&#x653E;&#x5185;&#x5B58;&#x5360;&#x7528;&#x3002;</span>
<span class="hljs-function">bStatus_t <span class="hljs-title">tmos_msg_deallocate</span><span class="hljs-params">( uint8_t *msg_ptr )</span></span>;

<span class="hljs-keyword">uint8_t</span>   tmos_snv_read( <span class="hljs-keyword">uint8_t</span> id, <span class="hljs-keyword">uint8_t</span> len, <span class="hljs-keyword">void</span> *pBuf);

<span class="hljs-comment">/******TMOS&#x5B9A;&#x4E49;&#x7684;&#x51FD;&#x6570;&#xFF0C;&#x8F83;C&#x5E93;&#x51FD;&#x6570;&#x8282;&#x7701;&#x5185;&#x5B58;&#xFF0C;&#x529F;&#x80FD;&#x7C7B;&#x4F3C;******/</span>
<span class="hljs-keyword">uint32_t</span>    tmos_rand( <span class="hljs-keyword">void</span>  );   <span class="hljs-comment">// pseudo-random number                                    </span>
<span class="hljs-function"><span class="hljs-keyword">bool</span>        <span class="hljs-title">tmos_memcmp</span><span class="hljs-params">( <span class="hljs-keyword">const</span> <span class="hljs-keyword">void</span> *src1, <span class="hljs-keyword">const</span> <span class="hljs-keyword">void</span> *src2, uint32_t len )</span></span>; <span class="hljs-comment">// TRUE - same, FALSE - different</span>
<span class="hljs-function"><span class="hljs-keyword">bool</span>        <span class="hljs-title">tmos_isbufset</span><span class="hljs-params">( uint8_t *buf, uint8_t val, uint32_t len )</span></span>; <span class="hljs-comment">// TRUE if all &quot;val&quot;,FALSE otherwise</span>
<span class="hljs-keyword">uint32_t</span>    tmos_strlen( <span class="hljs-keyword">char</span> *pString );
<span class="hljs-keyword">uint32_t</span>    tmos_memset( <span class="hljs-keyword">void</span> * pDst, <span class="hljs-keyword">uint8_t</span> Value, <span class="hljs-keyword">uint32_t</span> len );               
<span class="hljs-function"><span class="hljs-keyword">void</span>        <span class="hljs-title">tmos_memcpy</span><span class="hljs-params">( <span class="hljs-keyword">void</span> *dst, <span class="hljs-keyword">const</span> <span class="hljs-keyword">void</span> *src, uint32_t len )</span></span>; <span class="hljs-comment">// Generic memory copy.</span>
</code></pre>
<h2 id="4&#x3001;tmos-&#x4F7F;&#x7528;demo">4&#x3001;TMOS &#x4F7F;&#x7528;Demo</h2>
<h3 id="41-&#x4EFB;&#x52A1;&#x7BA1;&#x7406;">4.1 &#x4EFB;&#x52A1;&#x7BA1;&#x7406;</h3>
<h4 id="411-&#x793A;&#x4F8B;&#x4EE3;&#x7801;">4.1.1 &#x793A;&#x4F8B;&#x4EE3;&#x7801;</h4>
<p><strong>tmos_demo_task.h</strong></p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">ifndef</span> _TMOS_DEMO_TASK_H_</span>
<span class="hljs-meta">#dedine _TMOS_DEMO_TASK_H_</span>

<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-string">&quot;CH57x_common.h&quot;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-string">&quot;CH57xBLE_LIB.H&quot;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-string">&quot;stdint.h&quot;</span></span>

<span class="hljs-meta">#<span class="hljs-meta-keyword">define</span> DEMO_TASK_TMOS_EVT_TEST_1   (0x0001&lt;&lt;0)</span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">define</span> DEMO_TASK_TMOS_EVT_TEST_2   (0x0001&lt;&lt;1)</span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">define</span> DEMO_TASK_TMOS_EVT_TEST_3   (0x0001&lt;&lt;2)</span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">define</span> DEMO_TASK_TMOS_EVT_TEST_4   (0x0001&lt;&lt;3)</span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">define</span> DEMO_TASK_TMOS_EVT_TEST_5   (0x0001&lt;&lt;4)</span>

<span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">demo_task_init</span><span class="hljs-params">(<span class="hljs-keyword">void</span>)</span></span>;

<span class="hljs-meta">#<span class="hljs-meta-keyword">endif</span></span>
</code></pre>
<p><strong>tmos_demo_task.C</strong></p>
<pre><code class="lang-C"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-string">&quot;tmos_demo_task.h&quot;</span></span>

<span class="hljs-comment">//&#x5B58;&#x50A8; &#x5F53;&#x524D;task id &#x7684;&#x5168;&#x5C40;&#x53D8;&#x91CF;</span>
tmosTaskID  demo_task_id = INVALID_TASK_ID;


<span class="hljs-comment">//task&#x7684;event&#x5904;&#x7406;&#x56DE;&#x8C03;&#x51FD;&#x6570;,&#x9700;&#x8981;&#x5728;&#x6CE8;&#x518C;task&#x65F6;&#x5019;,&#x4F20;&#x8FDB;&#x53BB;</span>
<span class="hljs-function"><span class="hljs-keyword">static</span> uint16_t <span class="hljs-title">demo_task_process_event</span><span class="hljs-params">( uint8_t task_id, uint16_t events )</span> 
</span>{

    <span class="hljs-comment">//event &#x5904;&#x7406;</span>
    <span class="hljs-keyword">if</span>(events &amp; DEMO_TASK_TMOS_EVT_TEST_1) 
    {
        PRINT(<span class="hljs-string">&quot;DEMO_TASK_TMOS_EVT_TEST_1 evt test \r\n&quot;</span>);
        <span class="hljs-keyword">return</span> (events ^ DEMO_TASK_TMOS_EVT_TEST_1); <span class="hljs-comment">//&#x5F02;&#x6216;&#x7684;&#x65B9;&#x5F0F;&#x6E05;&#x9664;&#x8BE5;&#x4E8B;&#x4EF6;&#x8FD0;&#x884C;&#x6807;&#x5FD7;&#xFF0C;&#x5E76;&#x8FD4;&#x56DE;&#x672A;&#x8FD0;&#x884C;&#x7684;&#x4E8B;&#x4EF6;&#x6807;&#x5FD7;       </span>
    }
    <span class="hljs-comment">//event &#x5904;&#x7406;</span>
    <span class="hljs-keyword">if</span>(events &amp; DEMO_TASK_TMOS_EVT_TEST_2)
    {
        tmos_start_task(demo_task_id,DEMO_TASK_TMOS_EVT_TEST_3,<span class="hljs-number">1600</span>);
        PRINT(<span class="hljs-string">&quot;DEMO_TASK_TMOS_EVT_TEST_2 evt test \r\n&quot;</span>); 
        <span class="hljs-keyword">return</span> (events ^ DEMO_TASK_TMOS_EVT_TEST_2);  
    }
    <span class="hljs-comment">//event &#x5904;&#x7406;</span>
    <span class="hljs-keyword">if</span>(events &amp; DEMO_TASK_TMOS_EVT_TEST_3)
    {
        tmos_start_task(demo_task_id,DEMO_TASK_TMOS_EVT_TEST_3,<span class="hljs-number">1600</span>);
        PRINT(<span class="hljs-string">&quot;DEMO_TASK_TMOS_EVT_TEST_3 evt test \r\n&quot;</span>);
        <span class="hljs-keyword">return</span> (events ^ DEMO_TASK_TMOS_EVT_TEST_3);
    }
    <span class="hljs-comment">// Discard unknown events</span>
    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}

<span class="hljs-comment">//&#x521D;&#x59CB;&#x5316;task</span>
<span class="hljs-comment">//&#x5305;&#x62EC;&#x6CE8;&#x518C;&#x51FD;&#x6570;,&#x53EF;&#x4EE5;&#x6CE8;&#x518C;&#x540E;&#x53BB;&#x5F00;&#x542F;event</span>
<span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">demo_task_init</span><span class="hljs-params">( <span class="hljs-keyword">void</span> )</span> 
</span>{
    <span class="hljs-comment">//&#x6CE8;&#x518C;task id,&#x540C;&#x4E8B;&#x628A;&#x8BE5;task&#x7684;event&#x5904;&#x7406;&#x51FD;&#x6570;&#x4F20;&#x8FDB;&#x53BB;</span>
    demo_task_id  = TMOS_ProcessEventRegister( demo_task_process_event );
    <span class="hljs-comment">//&#x7ACB;&#x5373;&#x5F00;&#x59CB;&#x4E00;&#x4E2A;event</span>
    tmos_set_event(demo_task_id,DEMO_TASK_TMOS_EVT_TEST_1);
    <span class="hljs-comment">//&#x5F00;&#x59CB;&#x4E00;&#x4E2A;&#x5B9A;&#x65F6;event,1s&#x540E;&#x4EA7;&#x751F;,&#x5F53;&#x524D;&#x8BED;&#x53E5;&#x53EA;&#x4F1A;&#x4EA7;&#x751F;&#x4E00;&#x6B21;event</span>
    <span class="hljs-comment">//&#x53EF;&#x4EE5;&#x5728;event&#x4EA7;&#x751F;&#x540E;&#x53BB;&#x5F00;&#x542F;event,&#x53EF;&#x4EE5;&#x662F;&#x522B;&#x7684;task&#x7684;,&#x4E5F;&#x53EF;&#x4EE5;&#x662F;&#x5F53;&#x524D;task&#x7684;event</span>
    tmos_start_task(demo_task_id,DEMO_TASK_TMOS_EVT_TEST_2,<span class="hljs-number">1600</span>);
}
</code></pre>
<h4 id="412-&#x4F7F;&#x7528;&#x65B9;&#x6CD5;">4.1.2 &#x4F7F;&#x7528;&#x65B9;&#x6CD5;</h4>
<ul>
<li><p>&#x628A;&#x4E0A;&#x9762;&quot;tmos_demo_task.c&quot; &#x548C; &quot;tmos_demo_task.h&quot; &#x4E24;&#x4E2A;&#x6587;&#x4EF6;&#x52A0;&#x5230;&#x5DE5;&#x7A0B;&#x91CC;&#x9762;</p>
</li>
<li><p>&#x5728;main&#x51FD;&#x6570;&#x91CC;&#x7684;while(1)&#x4E4B;&#x524D;&#x4E0A;&#x9762;&#x8C03;&#x7528;&#x51FD;&#x6570; demo_task_init();</p>
</li>
</ul>
<h4 id="413-&#x8FD0;&#x884C;&#x73B0;&#x8C61;">4.1.3 &#x8FD0;&#x884C;&#x73B0;&#x8C61;</h4>
<ol>
<li>&#x82AF;&#x7247;&#x5148;&#x8FD0;&#x884C; <code>PRINT(&quot;DEMO_TASK_TMOS_EVT_TEST_1 evt test \r\n&quot;);</code></li>
<li>&#x4E00;&#x79D2;&#x540E;&#x8FD0;&#x884C; <code>PRINT(&quot;DEMO_TASK_TMOS_EVT_TEST_2 evt test \r\n&quot;);</code></li>
<li>&#x7136;&#x540E;&#x6309;&#x7167;1s&#x4E00;&#x6B21;&#x4E0D;&#x65AD;&#x8FD0;&#x884C; <code>PRINT(&quot;DEMO_TASK_TMOS_EVT_TEST_3 evt test \r\n&quot;);</code></li>
</ol>
<h3 id="42-&#x6D88;&#x606F;&#x7BA1;&#x7406;">4.2 &#x6D88;&#x606F;&#x7BA1;&#x7406;</h3>
<h4 id="421-&#x793A;&#x4F8B;&#x4EE3;&#x7801;">4.2.1 &#x793A;&#x4F8B;&#x4EE3;&#x7801;</h4>
<p><strong>tmos_message_demo_message.h</strong></p>
<pre><code class="lang-c"><span class="hljs-meta">#<span class="hljs-meta-keyword">ifndef</span> _TMOS_DEMO_MESSAGE_H_</span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">define</span> _TMOS_DEMO_MESSAGE_H_</span>

<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-string">&quot;CH57x_common.h&quot;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-string">&quot;CH57xBLE_LIB.H&quot;</span></span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-string">&quot;stdint.h&quot;</span></span>

<span class="hljs-comment">// Test Task Events</span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">define</span> TEST_EVENT_1         (0x0001&lt;&lt;0)</span>
<span class="hljs-meta">#<span class="hljs-meta-keyword">define</span> TEST_EVENT_2         (0x0001&lt;&lt;1)</span>

<span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">TMOS_init</span><span class="hljs-params">(<span class="hljs-keyword">void</span>)</span></span>;

<span class="hljs-keyword">uint16_t</span> test_process_event_1(<span class="hljs-keyword">uint8_t</span> taskID,<span class="hljs-keyword">uint16_t</span> event);
<span class="hljs-keyword">uint16_t</span> test_process_event_2(<span class="hljs-keyword">uint8_t</span> taskID,<span class="hljs-keyword">uint16_t</span> event);
<span class="hljs-meta">#<span class="hljs-meta-keyword">endif</span></span>
</code></pre>
<p><strong>tmos_demo_message.c</strong></p>
<pre><code class="lang-C"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-string">&quot;tmos_demo_message.h&quot;</span></span>

<span class="hljs-meta">#<span class="hljs-meta-keyword">define</span> MSG_EVENT_TEST 0x10</span>

<span class="hljs-keyword">uint8_t</span> TestTaskID1 = INVALID_TASK_ID;
<span class="hljs-keyword">uint8_t</span> TestTaskID2 = INVALID_TASK_ID;

<span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">TMOS_init</span><span class="hljs-params">(<span class="hljs-keyword">void</span>)</span>
</span>{
    TestTaskID1 = TMOS_ProcessEventRegister(test_process_event_1);
    TestTaskID2 = TMOS_ProcessEventRegister(test_process_event_2);

    tmos_start_task( TestTaskID1, TEST_EVENT_1, <span class="hljs-number">1600</span> );
    tmos_start_task( TestTaskID2, TEST_EVENT_2, <span class="hljs-number">1600</span> );  <span class="hljs-comment">//&#x5EF6;&#x65F6;&#x542F;&#x52A8; TEST_EVENT_2&#x4E8B;&#x4EF6;  &#x5EF6;&#x65F6;&#x65F6;&#x95F4;&#xFF1A;1600*625us</span>
}

<span class="hljs-comment">//&#x6D88;&#x606F;&#x5904;&#x7406;&#x7684;&#x51FD;&#x6570;</span>
<span class="hljs-function"><span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">demo_task_process_TMOSMsg</span><span class="hljs-params">( tmos_event_hdr_t *pMsg )</span> 
</span>{
    <span class="hljs-keyword">switch</span> ( pMsg-&gt;event )
    {
    <span class="hljs-keyword">case</span> MSG_EVENT_TEST:
            PRINT(<span class="hljs-string">&quot;pMsg-&gt;event=%x&#xFF0C;pMsg-&gt;status=%x\r\n&quot;</span>,pMsg-&gt;event,pMsg-&gt;status);
        <span class="hljs-keyword">break</span>;

    <span class="hljs-keyword">default</span>:
        PRINT(<span class="hljs-string">&quot;pMsg-&gt;event %04x\r\n&quot;</span>,pMsg-&gt;event);
        <span class="hljs-keyword">break</span>;
    }
}

<span class="hljs-keyword">uint16_t</span> test_process_event_1(<span class="hljs-keyword">uint8_t</span> taskID,<span class="hljs-keyword">uint16_t</span> events)
{
    <span class="hljs-keyword">tmos_event_hdr_t</span> *test_message;

    <span class="hljs-keyword">if</span> ( events &amp; TEST_EVENT_1 )
    {
        PRINT(<span class="hljs-string">&quot;Run TEST_EVENT_1 in task 1\r\n&quot;</span>);
        <span class="hljs-comment">//&#x7533;&#x8BF7;&#x6D88;&#x606F;&#x5185;&#x5B58;&#x7A7A;&#x95F4;</span>
        test_message =(<span class="hljs-keyword">tmos_event_hdr_t</span>*) tmos_msg_allocate(<span class="hljs-keyword">sizeof</span>(<span class="hljs-keyword">tmos_event_hdr_t</span>));
        <span class="hljs-keyword">if</span>(test_message)
        {
            test_message-&gt;event = MSG_EVENT_TEST;
            test_message-&gt;status = <span class="hljs-number">0x55</span>;
            <span class="hljs-comment">//&#x53D1;&#x9001;&#x6D88;&#x606F;&#x81F3; TestTaskID2 &#x4EFB;&#x52A1;</span>
            tmos_msg_send(TestTaskID2 ,(<span class="hljs-keyword">uint8_t</span> *)test_message);
        }
        tmos_start_task( taskID, TEST_EVENT_1, <span class="hljs-number">1600</span> );
        <span class="hljs-keyword">return</span> ( events ^ TEST_EVENT_1 );
    }

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}

<span class="hljs-keyword">uint16_t</span> test_process_event_2(<span class="hljs-keyword">uint8_t</span> taskID,<span class="hljs-keyword">uint16_t</span> events)
{
    <span class="hljs-comment">//&#x6D88;&#x606F;&#x5904;&#x7406;</span>
    <span class="hljs-keyword">if</span> ( events &amp; SYS_EVENT_MSG ) 
    {
        <span class="hljs-keyword">uint8_t</span> *pMsg;
        <span class="hljs-keyword">if</span> ( (pMsg = tmos_msg_receive( taskID )) != <span class="hljs-literal">NULL</span> ) 
        {
            <span class="hljs-comment">//&#x6D88;&#x606F;&#x5904;&#x7406;</span>
            demo_task_process_TMOSMsg( (<span class="hljs-keyword">tmos_event_hdr_t</span> *)pMsg );
            <span class="hljs-comment">//&#x91CA;&#x653E;&#x6D88;&#x606F;&#x7A7A;&#x95F4;</span>
            tmos_msg_deallocate( pMsg );
        }
        <span class="hljs-comment">// return unprocessed events</span>
        <span class="hljs-keyword">return</span> (events ^ SYS_EVENT_MSG);
    }

    <span class="hljs-comment">//&#x4E8B;&#x4EF6;&#x5904;&#x7406;</span>
    <span class="hljs-keyword">if</span> ( events &amp; TEST_EVENT_2 )
    {
        PRINT(<span class="hljs-string">&quot;Run TEST_EVENT_2 in task 2\r\n&quot;</span>);

        tmos_start_task( taskID, TEST_EVENT_2, <span class="hljs-number">1600</span> );
        <span class="hljs-keyword">return</span> ( events ^ TEST_EVENT_2 );
    }

    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}
</code></pre>
<h4 id="422-&#x4F7F;&#x7528;&#x65B9;&#x6CD5;">4.2.2 &#x4F7F;&#x7528;&#x65B9;&#x6CD5;</h4>
<ul>
<li>&#x628A;&#x4E0A;&#x9762;&quot;tmos_demo_message.c&quot; &#x548C; &quot;tmos_demo_message.h&quot; &#x4E24;&#x4E2A;&#x6587;&#x4EF6;&#x52A0;&#x5230;&#x5DE5;&#x7A0B;&#x91CC;&#x9762;</li>
<li>&#x5728;main&#x51FD;&#x6570;&#x91CC;&#x7684;while(1)&#x4E4B;&#x524D;&#x4E0A;&#x9762;&#x8C03;&#x7528;&#x51FD;&#x6570; demo_task_init();</li>
</ul>
<h4 id="423-&#x8FD0;&#x884C;&#x73B0;&#x8C61;">4.2.3 &#x8FD0;&#x884C;&#x73B0;&#x8C61;</h4>
<p>&#x95F4;&#x9694;1S&#xFF0C;&#x91CD;&#x590D;&#x8FD0;&#x884C;&#xFF1A;</p>
<ul>
<li><code>PRINT(&quot;Run TEST_EVENT_1 in task 1\r\n&quot;);</code></li>
<li><code>PRINT(&quot;Run TEST_EVENT_2 in task 2\r\n&quot;);</code></li>
<li><code>PRINT(&quot;pMsg-&gt;event=%x&#xFF0C;pMsg-&gt;status=%x\r\n&quot;,pMsg-&gt;event,pMsg-&gt;status);</code></li>
</ul>
<h2 id="5&#x3001;tmos&#x4F7F;&#x7528;&#x6CE8;&#x610F;&#x4E8B;&#x9879;">5&#x3001;TMOS&#x4F7F;&#x7528;&#x6CE8;&#x610F;&#x4E8B;&#x9879;</h2>
<ul>
<li>&#x7981;&#x6B62;&#x5728;&#x4E2D;&#x65AD;&#x4E2D;&#x8C03;&#x7528;&#x4EFB;&#x52A1;&#x8C03;&#x5EA6;&#x51FD;&#x6570;</li>
<li>&#x5982;&#x679C;&#x4F7F;&#x7528;&#x4E86;ble,&#x5EFA;&#x8BAE;&#x4E0D;&#x8981;&#x5728;&#x5355;&#x4E2A;&#x4EFB;&#x52A1;&#x4E2D;&#x6267;&#x884C;&#x8D85;&#x8FC7;&#x8FDE;&#x63A5;&#x95F4;&#x9694;&#x4E00;&#x534A;&#x65F6;&#x957F;&#x7684;&#x4EFB;&#x52A1;&#xFF0C;&#x5426;&#x5219;&#x5C06;&#x5F71;&#x54CD;&#x84DD;&#x7259;&#x901A;&#x8BAF;</li>
<li>&#x5728;&#x4E8B;&#x4EF6;&#x751F;&#x6548;&#x6267;&#x884C;&#x7684;&#x4EE3;&#x7801;&#x4E2D;&#x8C03;&#x7528;<code>tmos_start_task</code>&#x51FD;&#x6570;&#x65F6;&#xFF0C;&#x5EF6;&#x65F6;&#x65F6;&#x95F4;&#x4EE5;&#x5F53;&#x524D;&#x4E8B;&#x4EF6;&#x751F;&#x6548;&#x65F6;&#x95F4;&#x70B9;&#x4E3A;&#x57FA;&#x51C6;&#x504F;&#x79FB;&#xFF0C;&#x6240;&#x4EE5;&#x5BF9;&#x8C03;&#x7528;&#x5EF6;&#x65F6;&#x6267;&#x884C;&#x51FD;&#x6570;&#x5728;&#x751F;&#x6548;&#x6267;&#x884C;&#x7684;&#x4EE3;&#x7801;&#x4E2D;&#x6446;&#x653E;&#x7684;&#x4F4D;&#x7F6E;&#x6CA1;&#x6709;&#x8981;&#x6C42;&#x3002;</li>
<li>&#x4EFB;&#x52A1;&#x5B58;&#x5728;&#x4F18;&#x5148;&#x7EA7;&#xFF0C;&#x6839;&#x636E;&#x5728;xxx_ProcessEvent&#x51FD;&#x6570;&#x4E2D;&#x5224;&#x65AD;&#x7684;&#x5148;&#x540E;&#x987A;&#x5E8F;&#x51B3;&#x5B9A;&#xFF0C;&#x540C;&#x65F6;&#x751F;&#x6548;&#x7684;&#x4EFB;&#x52A1;&#xFF0C;&#x5148;&#x6267;&#x884C;&#x5148;&#x5224;&#x65AD;&#xFF0C;&#x540E;&#x6267;&#x884C;&#x540E;&#x5224;&#x65AD;&#x3002;&#x6CE8;&#x610F;&#xFF0C;&#x6267;&#x884C;&#x5B8C;&#x5148;&#x5224;&#x65AD;&#x7684;&#x4E8B;&#x4EF6;&#x4EFB;&#x52A1;&#x540E;&#xFF0C;&#x8981;&#x7B49;&#x5230;&#x4EFB;&#x52A1;&#x8C03;&#x5EA6;&#x7CFB;&#x7EDF;&#x8F6E;&#x5DE1;&#x4E00;&#x904D;&#x540E;&#xFF0C;&#x624D;&#x4F1A;&#x6267;&#x884C;&#x540E;&#x5224;&#x65AD;&#x7684;&#x4E8B;&#x4EF6;&#x4EFB;&#x52A1;&#x3002;</li>
<li>&#x4E8B;&#x4EF6;&#x540D;&#x6309;&#x4F4D;&#x5B9A;&#x4E49;&#xFF0C;&#x6BCF;&#x4E00;&#x5C42;taskID&#x6700;&#x591A;&#x5305;&#x542B;1&#x4E2A;&#x6D88;&#x606F;&#x4E8B;&#x4EF6;&#x548C;15&#x4E2A;&#x4EFB;&#x52A1;&#x4E8B;&#x4EF6;&#xFF08;&#x5171;16&#x4F4D;&#xFF09; </li>
</ul>
<footer class="page-footer"><span class="copyright">powered by Gitbook</span><span class="footer-modification">File Modify: 
2021-11-16 10:49:42
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../03_BLE的一些概念/03_BLE的一些概念.html" class="navigation navigation-prev " aria-label="Previous page: 第3章 BLE的一些概念">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../05_广播/05_广播.html" class="navigation navigation-next " aria-label="Next page: 第5章 广播">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"第4章 TMOS说明","level":"1.5","depth":1,"next":{"title":"第5章 广播","level":"1.6","depth":1,"path":"05_广播/05_广播.md","ref":"05_广播/05_广播.md","articles":[]},"previous":{"title":"第3章 BLE的一些概念","level":"1.4","depth":1,"path":"03_BLE的一些概念/03_BLE的一些概念.md","ref":"03_BLE的一些概念/03_BLE的一些概念.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["-lunr","-search","-sharing","search-pro","back-to-top-button","chapter-fold","splitter","tbfed-pagefooter","popup","intopic-toc","copy-code-button","github","hide-element","pageview-count","livereload"],"pluginsConfig":{"tbfed-pagefooter":{},"chapter-fold":{},"github":{"url":"https://gitee.com/taoyukai/ch32v307_development_guide"},"intopic-toc":{"isCollapsed":true,"isScrollspyActive":true,"label":"In this article","maxDepth":6,"mode":"nested","selector":".markdown-section h1, .markdown-section h2, .markdown-section h3, .markdown-section h4, .markdown-section h5, .markdown-section h6","visible":true},"livereload":{},"splitter":{},"search-pro":{},"popup":{},"hide-element":{"elements":[".gitbook-link"]},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"back-to-top-button":{},"pageview-count":{},"copy-code-button":{},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"04_TMOS说明/04_TMOS说明.md","mtime":"2021-11-16T02:49:42.500Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-11-16T03:05:52.403Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-intopic-toc/anchor.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-intopic-toc/gumshoe.polyfills.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-intopic-toc/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-copy-code-button/toggle.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

